/*
 * @(#)MockServiceExecutor.java $version 2010. 8. 11
 *
 * Copyright 2007-2010 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.nhncorp.usf.core.test;

import java.util.Map;

import com.nhncorp.usf.core.config.runtime.Action;
import com.nhncorp.usf.core.exception.ExceptionHandler;
import com.nhncorp.usf.core.invoker.Invoker;
import com.nhncorp.usf.core.service.ServiceExecutor;


/**
 * Mock {@link ServiceExecutor}.
 *
 * @author Web Platform Development Team
 */
public class MockServiceExecutor implements ServiceExecutor {
	RESULT_STATUS resultStatus;

	/**
	 * @see com.nhncorp.usf.core.service.ServiceExecutor#execute(com.nhncorp.usf.core.config.runtime.Action, java.util.Map)
	 * @param actionInfo Action
	 * @param requestDataMap Map<String, Object>
	 * @throws Exception the Exception
	 * @return RESULT_STATUS
	 */
	public RESULT_STATUS execute(Action actionInfo, Map<String, Object> requestDataMap) throws Exception {
		if (resultStatus == null) {
			return RESULT_STATUS.success;
		}
		
		return resultStatus;
	}

	/**
	 * @see com.nhncorp.usf.core.service.ServiceExecutor#setInvoker(com.nhncorp.lucy.net.invoker.Invoker)
	 * @param invoker Invoker
	 */
	public void setInvoker(Invoker invoker) {
		// implement ServiceExecutor
	}

	/**
	 * @see com.nhncorp.usf.core.service.ServiceExecutor#setExceptionHandler(com.nhncorp.usf.core.exception.ExceptionHandler)
	 * @param exceptionHandler ExceptionHandler
	 */
	public void setExceptionHandler(ExceptionHandler exceptionHandler) {
		// implement ServiceExecutor
	}
}
